|
![](/i/fill.gif) |
On Thu, 08 Nov 2001 10:05:45 +0100, Christoph Hormann <chr### [at] gmx de>
wrote:
> There are of course an infinite number of possible tesselations of a
> sphere
of course
> the best results can be expected from a method producing nearly
> equilateral triangles.
as I expected
> I'm not sure what exactly you want, but see
> http://www.cris.com/~rjbono/html/dome_res.html for some more resources.
thanks. I found important sentence somewhere at those links. My method was good
but I started with spliting from tetrahedron but should from octahedron. Here is
simple source to show fast nice triangulation controled by integer Step
variable.
#declare Step=7;
#macro Split(P1,P2,P3,Step)
#local P1=vnormalize(P1);
#local P2=vnormalize(P2);
#local P3=vnormalize(P3);
#if(Step>0)
Split(P1,(P1+P2)/2,(P1+P3)/2,Step-1)
Split(P2,(P2+P1)/2,(P2+P3)/2,Step-1)
Split(P3,(P3+P2)/2,(P3+P1)/2,Step-1)
Split((P2+P3)/2,(P1+P2)/2,(P1+P3)/2,Step-1)
#else
triangle{P1,P2,P3}
#end
#end
mesh{
Split(x,z,y,Step)
Split(z,-x,y,Step)
Split(-x,-z,y,Step)
Split(-z,x,y,Step)
Split(x,z,-y,Step)
Split(z,-x,-y,Step)
Split(-x,-z,-y,Step)
Split(-z,x,-y,Step)
}
ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35
Post a reply to this message
|
![](/i/fill.gif) |